package web.beans;

import Car.bo.CarBo;
import Car.model.Car;
import util.Context;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import java.util.List;

/**
 * Created by Новак on 30.11.2014.
 */

public class AdvertisementsBean {
    List<Car> cars;

    @PostConstruct
    public void init(){
        CarBo carBo =(CarBo) Context.getAppContext().getBean("carBo");
        cars=carBo.getAllCar();
    }

    public List<Car> getCars() {
        return cars;
    }
    public void setCars(List<Car> cars) {
        this.cars = cars;
    }
}
